<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="embroot.css">
<TITLE>
Managing Data and Memory in Mixed-Language Applications
</TITLE>
</HEAD>
<BODY >
<A HREF="embroot003.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="embroot012.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H1 CLASS="chapter"><A NAME="htoc15">Chapter&nbsp;3</A>&nbsp;&nbsp;Managing Data and Memory in Mixed-Language Applications</H1>
<A NAME="chapmixed"></A>

<BR>
<BR>
ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> is a software engine for constraint propagation and search tasks.
As such, it represents its data in a form that is different
from how it would be represented in a traditional C/C++ program.
<A NAME="@default34"></A>
<A NAME="@default35"></A>
<A NAME="@default36"></A>
In particular,
the ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> data representation supports automatic memory management
and garbage collection, modifications that can be undone in a search context,
referential transparency and dynamic typing.<BR>
<BR>
In a mixed-language application, there are two basic ways of communicating
information between the components coded in the different languages:
<A NAME="@default37"></A>
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description">
<B>Conversion:</B><DD CLASS="dd-description"> When data is needed for processing in another language,
 it can be converted to the corresponding representation.
 This technique is appropriate for simple data types (integers, strings),
 but can have a lot of overhead for complex structures.
<DT CLASS="dt-description"><B>Sharing:</B><DD CLASS="dd-description"> The bulk of the data is left in its original representation,
 referred to by a handle, and interface functions (or methods) provide
 access to its components when required.
</DL>
Both techniques are supported by the ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>/C and ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>/C++ interface.<BR>
<BR>
<UL>
<LI><A HREF="embroot008.html">Constructing ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> data</A>
<UL>
<LI><A HREF="embroot008.html#toc10">ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> atoms and functors</A>
<LI><A HREF="embroot008.html#toc11">Building ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> terms</A>
<LI><A HREF="embroot008.html#toc12">Building atomic ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> terms</A>
<LI><A HREF="embroot008.html#toc13">Building ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> lists</A>
<LI><A HREF="embroot008.html#toc14">Building ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> structures</A>
</UL>
<LI><A HREF="embroot009.html">Converting ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> data to C data</A>
<UL>
<LI><A HREF="embroot009.html#toc15">Converting simple ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> terms to C data types</A>
<LI><A HREF="embroot009.html#toc16">Decomposing ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> terms</A>
</UL>
<LI><A HREF="embroot010.html">Referring to ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> terms</A>
<LI><A HREF="embroot011.html">Passing generic C or C++ data to ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP></A>
<UL>
<LI><A HREF="embroot011.html#toc17">Wrapping and unwrapping external data in an ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> term</A>
<LI><A HREF="embroot011.html#toc18">The method table</A>
</UL>
</UL>
<BR>
<BR>

<BR>
<BR>
<HR>
<A HREF="embroot003.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="embroot012.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
